﻿using Camc.Quality.QualityAnalysis.RFormBase;
using Camc.Quality.QualityAnalysis.RFormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.QualityAnalysis.RFormEntity
{
  public     class R传感器安装测试记录情况统计记录表 : RTableBase
    {

        public R传感器安装测试记录情况统计记录表(int serialNum, Guid rWorkStepEntityId, Guid rProcessesEntityId, int sort, string parentProductNum, string parentProductName, string fisrtDrawingNum, string firstDrawingName, string recordElement, string recordItem, string toolUsed, string secondToolUsed, string thirdToolUsed,string recordRemark)
        {
            SerialNum = serialNum;
            RWorkStepEntityId = rWorkStepEntityId;
            RProcessesEntityId = rProcessesEntityId;
            Sort = sort;

            ParentProductNum = parentProductNum;
            ParentProductName = parentProductName;
            FisrtDrawingNum = fisrtDrawingNum;
            FirstDrawingName = firstDrawingName;
            RecordElement = recordElement;
            RecordItem = recordItem;
            ToolUsed = toolUsed;
            SecondToolUsed = secondToolUsed;
            ThirdToolUsed = thirdToolUsed;
            RecordRemark = recordRemark;
        }

        public override string FormName { get; protected set; } = "传感器安装测试记录情况统计记录表";

        public override string ParentProductNum_DisplayName { get; protected set; } = "图号";
        
        public override string ParentProductName_DisplayName { get; protected set; } = "名称";
 
        public override string FisrtDrawingNum_DisplayName { get; protected set; } = "传感器代号";

        public override string FirstDrawingName_DisplayName { get; protected set; } = "传感器名称"; 

        public override string RecordElement_DisplayName { get; protected set; } = "导通检查点";   

        public override string RecordItem_DisplayName { get; protected set; } = "绝缘检查点";

        public override string ToolUsed_DisplayName { get; protected set; } = "所用数字三用表编号";

        public override string SecondToolUsed_DisplayName { get; protected set; } = "所用指针三用表编号";

        public override string ThirdToolUsed_DisplayName { get; protected set; } = "所用温湿度计编号";
        public RRecordRequirementsEntity SetRecordRequirements(RRecordRequirementsEntity entity, string recordLocation, string rcordStatus, string recordRequire, string recordMainopoint, string designerDemand, string processorDemand)
        {
            entity.SetRecordLocation(recordLocation, "参数代号");
            entity.SetRecordStatus(rcordStatus, "状态");
            entity.SetRecordRequire(recordRequire, "测试仪器1");
            entity.SetRecordMainopoint(recordMainopoint, "测试仪器2");
            entity.SetDesignerDemand(designerDemand, "导通要求阻值");
            entity.SetProcessorDemand(processorDemand, "绝缘要求阻值");
            return entity;
        }
        public RMeasuredResultEntity SetMeasuredResult(RMeasuredResultEntity entity, string firstMeasuredValues, string secondMeasuredValues)
        {
            entity.SetFirstMeasuredValues(firstMeasuredValues, "实测阻值1");
            entity.SetSecondMeasuredValues(secondMeasuredValues, "实测阻值2");
            return entity;
        }
        public REnvironmentEntity SetEnvironment(REnvironmentEntity entity, string temperature, string humidity)
        {
            entity.SetTemperature(temperature, "温度");
            entity.SetHumidity(humidity, "湿度");
            return entity;
        }
        public RInspectionSignatureEntity SetInspectionSignature(RInspectionSignatureEntity entity, string firstOperator, DateTime? firstOperatorTime, string secondOperator, DateTime? secondOperatorTime, string thirdOperator, DateTime? thirdOperatorTime)
        {
            entity.InspectionSignatureName = "三检";
            entity.SetFirstOperator(firstOperator, "操作者", firstOperatorTime, "操作者操作时间");
            entity.SetSecondOperator(secondOperator, "互检者", secondOperatorTime, "互检者操作时间");
            entity.SetThirdOperator(thirdOperator, "检验员", thirdOperatorTime, "检验员操作时间");
            return entity;
        }
    }
}
